home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / timem130.zip / TIMEM.DOC next >
Text File  |  1991-11-13  |  12KB  |  255 lines

  1.      ┌─────────────────────────────────────────────────────────────┐
  2.      │ Trademarked names are the property of the respective owners │
  3.      └─────────────────────────────────────────────────────────────┘
  4.  
  5.                     TIMEM
  6.  
  7.                (c) Copyright 1991 FM de Monasterio
  8.              Licensed Material - All rights reserved
  9.  
  10.                  Version 1.30
  11.  
  12.  
  13.    1. SUMMARY
  14.  
  15.    TIMEM is a utility to measure memory access times over a range of memory
  16.    as small as 1 kb or as large as 1 Mb.  It is useful for the selection of
  17.    an upper-memory block (UMB) for resident utilities capable of installing
  18.    themselves in upper memory (via an XMS manager) and of selecting a lower
  19.    limit for the UMB.
  20.  
  21.  
  22.  
  23.    2. GENERAL INFORMATION
  24.  
  25.    Several types of addressable memory are found in iAPX 80x86 CPUs.  In all
  26.    DOS-compatible machines, however, the first megabyte (1 Mb = 1,024 kb) of
  27.    memory comprises the initial 640 kb of address space used by DOS, and the
  28.    remaining 384 kb of address space used by hardware subsystems and by BIOS
  29.    routines. The memory under the 640-kb DOS hardware barrier is referred to
  30.    as conventional memory, and above it as the Upper Memory Area (UMA).
  31.  
  32.          0 kb                         640 kb            1024 kb
  33.                    Conventional RAM               UMB       
  34.           ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  35.  
  36.  
  37.  
  38.    In the IBM AT and compatibles, which can support a physical address space
  39.    larger than 1,024 kb, additional memory is located above the initial 1 Mb
  40.    of space, up to a physical address space of 16 Mb in 80286 and of 4 Gb in
  41.    80386 microprocessors.  The additional addressable RAM is called extended
  42.    memory and is subdivided into a High Memory Area, which is the initial 64
  43.    kb area immediately above the 1-Mb limit, i.e. from 1,024 kb to 1,088 kb,
  44.    and the extended memory blocks (EMBs), located above the physical address
  45.    at 1,088 kb.
  46.  
  47.            1Mb                                          16Mb-4Gb
  48.                        Extended memory                
  49.           ▒▒▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  50.           
  51.          0 kb
  52.  
  53.  
  54.    Irrespective of the CPU, DOS runs in an 086-compatible mode known as real
  55.    mode. In such a mode, where addressable memory is seen as consisting of a
  56.    series of 64-kb segments, memory addresses are made up of two portions: a
  57.    16-bit SEGMENT, between 0 and 65,535 (or FFFFh in hexadecimal), and a 16-
  58.    bit OFFSET, which is the distance in bytes (between 0 and FFFFh) from the
  59.    address to the first byte of the segment.
  60.  
  61.    By changing segment:offset values, up to 1 Mb of memory can be addressed;
  62.    given the inherent overlap of such a method of addressing, it is possible
  63.    to point to a given locale in memory, such as the beginning of the second
  64.    kilobyte of the UMA space (641 kb) by more than one segment:offset value,
  65.    e.g. A400:0000h, A000:0400h, 9FFF:0410h, 9400:C400h, etc.  This ambiguity
  66.    can be resolved by using physical addresses, in which these two parts are
  67.    combined to form a 20-bit address by multiplying the segment by 16 and by
  68.    adding the offset to it. (The highest possible 20-bit number is 1,024 kb,
  69.    which is why this is the maximum space of real-mode memory addressing.)
  70.  
  71.                    -----------------
  72.  
  73.    3. PROGRAM INFORMATION
  74.  
  75.    TIMEM measures access time in real mode to a range of memory blocks, each
  76.    of 1-kb length, starting at a user-specified, zero-offset segment between
  77.    0 and FFFFh, and ending at higher zero-offset segment either specified by
  78.    the user or set automatically by the program.
  79.  
  80.    TIMEM is useful to measure access time in sufficient detail to select the
  81.    best UMB base segment in which to install those resident programs capable
  82.    of loading themselves into an upper memory block (UMB) via an XMS manager
  83.    and of selecting a lower high-memory limit for the UMB.  This permits the
  84.    avoidance of high-memory areas whose timings might be considered too slow
  85.    for a particular resident's task.
  86.  
  87.    XMS services are implemented in some 386 memory managers, such as QEMM386
  88.    (Quarterdeck) and 386MAX (Qualitas), and the prototype XMS manager HIMEM.
  89.    SYS (Microsoft).  UMB functions of the XMS manager can be tested with the
  90.    UMAX utility.
  91.  
  92.                    ---------
  93.  
  94.    Because of intrinsic variations, timings should be repeated several times
  95.    to obtain a more representative evaluation.  The results represent micro-
  96.    seconds per kilobyte (µs/kb) for the particular metric used in this test,
  97.    and are sent to the video display via DOS.  This output can be redirected
  98.    to a file or the printer through the DOS redirection command > or >> when
  99.    executing the program.
  100.  
  101.    TIMEM uses the microcomputer's timer chip for these measurements. The IBM
  102.    PC family uses an 8253 (or 8254) timer chip to tally system clock pulses,
  103.    and for DMA memory-refresh operations, and speaker output.  Access timing
  104.    measurements do not affect the memory contents, but (because of the timer
  105.    reprogramming) may introduce small inaccuracies in the system-clock pulse
  106.    count maintained by the BIOS and used by DOS.  These inaccuracies are not
  107.    permanent and disappear when the CPU is rebooted; their occurrence can be
  108.    minimized by synchronizing timing loops with the system clock pulses (see
  109.    switch S below), although this results in a penalty in speed performance.
  110.  
  111.    TIMEM assumes the system timer is an 8253-compatible chip. If this is not
  112.    the case (as in IBM PS/2s), switch P helps to avoid measurement errors in
  113.    computers not compatible with the IBM PC hardware standard.
  114.  
  115.                    -----------------
  116.  
  117.    4. USAGE
  118.            TIMEM [seg1[seg2]] [/switches] [;comments]
  119.  
  120.  
  121.    seg1    The starting zero-offset segment in 4-digit hexadecimal notation
  122.        ranging between 0 and FFFF.  Default: Null argument = A000.
  123.  
  124.    seg2    The final zero-offset segment in 4-digit hexadecimal notation of
  125.        memory range to be timed.  The final segment must be higher than
  126.        the initial one.  Default: Null argument = (seg1+15 kb), invalid
  127.        argument = FFFF.
  128.  
  129.  
  130.    SWITCHES
  131.  
  132.    The switches are not case sensitive, may be given in any order, and must
  133.    be preceded by any ASCII character between space ( ) and slash (/):
  134.  
  135.  
  136.    /N     NonStop listing of access timing data.  Use this switch when the
  137.        data will be send to a file via DOS redirection commands.
  138.  
  139.    /P     Do not assume timer is an 8253-compatible chip (e.g., IBM PS/2).
  140.        This switch may introduce a small error when timing a very large
  141.        range of memory in a very slow CPU.
  142.  
  143.    /S     Synchronize timing loops and the system clock pulses to decrease
  144.        the possibility of introducing inaccuracies in the time count of
  145.        DOS when timing a large memory range in a slow CPU.  (Such small
  146.        inaccuracies are temporary and disappear upon rebooting.)  Since
  147.        the clock pulses only every 55 ms, this switch slows down TIMEM.
  148.  
  149.  
  150.    Comments may be added at the end of the command line invoking the program,
  151.    after the desired switches.  The comments, which may help clarifying batch
  152.    files, must be preceded by a semicolon (;), and are ignored by TIMEM.
  153.  
  154.    NOTE:
  155.    Do not use the redirection (<>) or pipe (|) command character of MS-DOS in
  156.    the comments since MS-DOS will try to implement the implied redirection or
  157.    pipe request.
  158.  
  159.  
  160.  ------------------------------------------------------------------------------
  161.  
  162.    5.  LICENSE
  163.  
  164.    This documentation, programs, and other files distributed in this software
  165.    package (the "Software")  are the copyrighted property of FM de Monasterio
  166.    (the "Author") who provides the Software and licenses its use.  All rights
  167.    are reserved. 
  168.  
  169.    If you would like to use this Software for education or nonprofit purposes
  170.    at home, please make a donation for poor children in need of medical care,
  171.    sending to the address below a check marked "For Deposit Only" and payable
  172.    to "PATIENT CARE FUND, CHILDREN'S HOSPITAL, Washington DC."  All donations
  173.    are sent to this hospital.  (Please indicate the program for which you are
  174.    making the donation.)
  175.  
  176.    For use by corporations, institutions or goverment agencies, or for-profit
  177.    purposes, contact the Author for licensing information.
  178.  
  179.  
  180.    U.S. GOVERNMENT INFORMATION
  181.  
  182.    The use, duplication, or disclosure by the U.S. Government of the Software
  183.    is subject to the restricted rights applicable to commercial software that
  184.    are specified in the subdivision (b.3.ii) of the 'Rights in Technical Data
  185.    and Computer Software' clause, document DFARS 52.227-7013.
  186.  
  187.  
  188.    DISTRIBUTION
  189.  
  190.    You may distribute this Software via magnetic and/or electronic means, but
  191.    you are specifically prohibited from:
  192.  
  193.     - Charging fees or asking donations in exchange of or payment
  194.       for copies of this Software.
  195.  
  196.     - Distributing this Software with commercial products without
  197.       the written, express permission in advance from the author.
  198.  
  199.     - Distributing this Software via a for-profit organization or
  200.       group, either alone or with other software.
  201.  
  202.     - Modifying any contents of this Software, including, but not
  203.       limited to, the copyright notice and this license.
  204.  
  205.  
  206.    The unauthorized copying, decompiling or disassembling of this Software is
  207.    prohibited.  Any other use of this Software is also prohibited without the
  208.    express, written permision in advance from the author.
  209.  
  210.  
  211.    WARRANTY DISCLAIMER
  212.  
  213.    The Author cannot and does not warrant that any functions contained in the
  214.    Software will meet your requirements, or that its operations will be error
  215.    free.  The entire risk as to the Software performance or quality, or both,
  216.    is solely with the user and not the Author.  You assume responsibility for
  217.    the selection of the program to achieve your intended results, and for the
  218.    installation, use, and results obtained from the Software.
  219.  
  220.    The Author makes no warranty, either implied or expressed, including with-
  221.    out limitation any warranty with respect to this Software documented here,
  222.    its quality, performance, or fitness for a particular purpose. In no event
  223.    shall the Author be liable to you for damages, whether direct or indirect,
  224.    incidental, special, or consequential arising out the use of or any defect
  225.    in the Software, even if the Author has been advised of the possibility of
  226.    such damages, or for any claim by any other party.
  227.  
  228.    All other warranties of any kind, either express or implied, including but
  229.    not limited to the implied warranties of merchantability and fitness for a
  230.    particular purpose, are expressly excluded.
  231.  
  232.  
  233.    LIMITATION OF REMEDIES
  234.  
  235.    The information contained in the documentation for the Software is subject
  236.    to change without notice.
  237.  
  238.    The Author's entire liability, and your exclusive remedy shall be: (1) the
  239.    replacement of an original Software diskette not meeting the above Limited
  240.    Warranty and which is returned to the Author along with proof of purchase,
  241.    or (2), if the Author is unable to deliver a replacement diskette which is
  242.    free of defects, you may terminate the License Agreement by returning this
  243.    Software and the corresponding license fee will be returned.
  244.  
  245.    By using the Software, you acknowledge (1) to have read and understood all
  246.    parts of this document and (2) to have agreed with and accepted all of its
  247.    provisions without any reservation.
  248.  
  249.                         FM de Monasterio
  250.                         P.O. Box 219
  251.                         Cabin John, MD 20818-0219
  252.  
  253.  ------------------------------------------------------------------------------
  254.  [END]
  255.